package lexer;

/**
 * User: bohao.wang
 * Date: 12-4-4
 * Time: 上午10:14
 */
public class Word extends Token {
    public String lexeme = "";

    public Word(String s, int tag) {
        super(tag);
        lexeme = s;
    }

    public Word(int tag) {
        super(tag);
    }

    public String toString() {
        return lexeme;
    }

    public static final Word
            element = new Word("<!ELEMENT", Tag.ELEMENT),
            attlist = new Word("<!ATTLIST", Tag.ATTLIST),
            xml = new Word("<?xml", Tag.XML),
            empty = new Word("EMPTY", Tag.EMPTY),
            any = new Word("ANY", Tag.ANY),
            pcdata = new Word("#PCDATA", Tag.PCDATA),
            pi = new Word("<?", Tag.pi),
            qend = new Word("?>", Tag.qend),
            comment = new Word("<!--", Tag.comment),
            end = new Word("</", Tag.end),
            commentEnd = new Word("-->", Tag.commentEnd),
            cdend = new Word("]]>", Tag.cdend),
            cdstart = new Word("<![CDATA[", Tag.cdstart),
            emptyEnd = new Word("/>", Tag.emptyEnd);
}
